﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MxWeiXinPF.BLL
{
    public partial class sendmessage
    {
        private readonly MxWeiXinPF.DAL.sendmessage dal;
        private readonly MxWeiXinPF.Model.siteconfig siteConfig = new MxWeiXinPF.BLL.siteconfig().loadConfig();

        public sendmessage()
        {
            this.dal = new MxWeiXinPF.DAL.sendmessage(this.siteConfig.sysdatabaseprefix);
        }

        public int Add(MxWeiXinPF.Model.sendmessage model)
        {
            return this.dal.Add(model);
        }

        public int AddInfo(MxWeiXinPF.Model.sendmessage model)
        {
            return this.dal.AddInfo(model);
        }

        public bool Delete(int id)
        {
            return this.dal.Delete(id);
        }

        public bool Exists(int id)
        {
            return this.dal.Exists(id);
        }

        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            return this.dal.GetList(Top, strWhere, filedOrder);
        }

        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            return this.dal.GetList(pageSize, pageIndex, strWhere, filedOrder, out recordCount);
        }

        public MxWeiXinPF.Model.sendmessage GetModel(int id)
        {
            return this.dal.GetModel(id);
        }

        public DataSet GetSmsMessage()
        {
            return this.dal.GetSmsMessage();
        }

        public DataSet GetTemplateMessage()
        {
            return this.dal.GetTemplateMessage();
        }

        public int InsertSendSMSmore(string Phone, string MessageContent, int numcount, int wid, int shopid)
        {
            return this.dal.InsertSendSMSmore(Phone, MessageContent, numcount, wid, shopid);
        }

        public bool Update(MxWeiXinPF.Model.sendmessage model)
        {
            return this.dal.Update(model);
        }

        public int UpdateField(int id, string strValue)
        {
            return this.dal.UpdateField(id, strValue);
        }

        public bool UpdateInfo(MxWeiXinPF.Model.sendmessage model)
        {
            return this.dal.UpdateInfo(model);
        }

        public bool UpdateIsSend(string issend, DateTime dt, int id)
        {
            return this.dal.UpdateIsSend(issend, dt, id);
        }
    }
}
